package com.java.thread.sample_02;

public class Client {
    public static void main(String[] args) throws Exception{
    	Runnable r = new ThreadStateTest();
    	Thread t = new Thread(r,"thread-a");
    	System.out.println(Key2Value.threadState(t.getState()));
		t.start();
		System.out.println(Key2Value.threadState(t.getState()));
		Thread.sleep(2000);
		System.out.println(Key2Value.threadState(t.getState()));
		Thread.sleep(5000);
		System.out.println(Key2Value.threadState(t.getState()));
		
		Thread t2 = new Thread(r,"thread-b");
		t2.start();
		Thread.sleep(7000);
		System.out.println(Key2Value.threadState(t.getState()));
		Thread.sleep(3000);
		System.out.println(Key2Value.threadState(t.getState()));
	}
}
